import Vue from 'vue'
import VueRouter from 'vue-router'

import filmRoutes from './routes/film'
import cinema from './routes/cinema'
import news from './routes/news'
import center from './routes/center'

Vue.use(VueRouter)

const routes = [
  filmRoutes,
  cinema,
  news,
  center,
  {
    path: '/',
    redirect: '/films'
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
